/*
** Copyright (C) 2011 Viens Yann
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef SCORE_HPP_
# define SCORE_HPP_

# include <string>
# include <list>
# include <utility>

class		Score
{
public:
	Score(std::string const&gameName, std::string const& fileName);
	void											addToScore(std::string const& nickName, const int score);
	void											loadFromFile();
	void											writeInFile();
	void											display(QWidget* parent);

	std::list<std::pair<std::string, int> > const&	getScores() const;
	std::pair<std::string, int> const&				last() const;
	bool											isEmpty() const;
	int												getNbScore() const;
private:
	std::string									_gameName;
	std::string									_fileName;
	std::list<std::pair<std::string, int> >		_scores;
};

#endif // !SCORE_HPP_